#pragma once
#include "sm_base.h"

class sm_misc : public sm_base
{
public:
	sm_misc();
	virtual ~sm_misc();
public:
	virtual const char* interface_name(){ return "sm_misc"; }
	virtual void on_time_out(long timer_key, void* act = NULL);
	virtual void on_svc(aot::im::iim_packet* pkt);
	virtual int get_sm_iid(){ return e_im_sm_iid_misc;}
private:
	void on_event_inet(aot::im::iim_packet* pkt);
	void on_event_change_my_status(aot::im::iim_packet* pkt);
	void on_event_send_exchange_buddy_info(aot::im::iim_packet* pkt);
	void on_event_del_buddy(aot::im::iim_packet* pkt);
	void on_event_send_t2t_user_define_msg(aot::im::iim_packet* pkt);
	void on_event_send_tbm_user_define_msg(aot::im::iim_packet* pkt);
	void on_event_send_cbm_user_define_msg(aot::im::iim_packet* pkt);
private:
	void do_inet_reply(aot::im::iim_packet* pkt);
	void do_inet_request(aot::im::iim_packet* pkt);
	void do_inet_reply_get_online_buddy_list(aot::im::iim_packet* pkt);
	void do_inet_reply_get_ent_member_online_list(aot::im::iim_packet* pkt);
	void do_inet_request_notify_boddy_status_change(aot::im::iim_packet* pkt);
	void do_inet_request_notify_ent_status_change(aot::im::iim_packet* pkt);
	void do_recv_t2t_user_define_msg(aot::im::iim_packet* pkt);
	void do_recv_tbm_user_define_msg(aot::im::iim_packet* pkt);
	void do_recv_cbm_user_define_msg(aot::im::iim_packet* pkt);
	void do_inet_reply_exchange_buddy_info(aot::im::iim_packet* pkt);
	void do_inet_request_exchange_buddy_info(aot::im::iim_packet* pkt);
	void do_inet_request_del_buddy(aot::im::iim_packet* pkt);

	void do_recv_sys_ebm_msg(aot::im::iim_packet* pkt);
	void do_recv_sys_tbm_msg(aot::im::iim_packet* pkt);
	void do_recv_sys_multicast_msg(aot::im::iim_packet* pkt);
	void do_recv_sys_broadcast_msg(aot::im::iim_packet* pkt);
	void do_recv_sys_broadcast_msg_unknow(aot::im::iim_packet* pkt);
};
